package org.dreamwork.tools.code.analyzer.core.data;

import org.dreamwork.persistence.*;

@ISchema (org.dreamwork.tools.code.analyzer.core.data.schema.CountedSchema.class)
public class Counted {
	@ISchemaField (name = "_id", id = true)
	private String id;

	@ISchemaField (name = "_entity_id")
	private String entityId;

	@ISchemaField (name = "_type")
	private String type;

	@ISchemaField (name = "_amount")
	private int amount;

	public String getId () {
		return id;
	}

	public void setId (String id) {
		this.id = id;
	}

	public String getEntityId () {
		return entityId;
	}

	public void setEntityId (String entityId) {
		this.entityId = entityId;
	}

	public String getType () {
		return type;
	}

	public void setType (String type) {
		this.type = type;
	}

	public int getAmount () {
		return amount;
	}

	public void setAmount (int amount) {
		this.amount = amount;
	}

	@Override
	public boolean equals (java.lang.Object o) {
		if (this == o) return true;
		if (o == null || getClass () != o.getClass ()) return false;
		Counted that = (Counted) o;
		return id != null && id.equals (that.id);
	}

	@Override
	public int hashCode () {
		return String.valueOf (id).hashCode ();
	}
}